package top.someapp.dxf2dsvg.dxf;

import top.someapp.dxf2dsvg.base.Description;

import javax.annotation.Nonnull;
import java.util.List;

/**
 * dxf文件中的“段”
 *
 * @author zwz
 * Created on 2020-04-17
 */
public interface Section {

    SectionName name();

    List<Item> items();

    void onItemFound(@Nonnull Item item);

    enum SectionName implements Description {
        HEADER("Header section"),
        CLASSES("Classes section"),
        TABLES("Tables section"),
        BLOCKS("Blocks section"),
        ENTITIES("Entities section"),
        OBJECTS("Objects section"),
        THUMBNAILIMAGE("Thumbnail image section"),
        ;

        private final String descn;

        SectionName(String descn) {
            this.descn = descn;
        }

        @Override
        public String describe() {
            return descn;
        }
    }
}
